﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;
//using KoPortal;

/// <summary>
/// Summary description for WebService
/// </summary>
[WebService(Namespace = "http://localhist:85/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class KoWebServiceSimple : System.Web.Services.WebService
{
    // Required by the Web Services Designer 
    private IContainer components = null;

    public KoWebServiceSimple () {

        //Uncomment the following line if using designed components 
        InitializeComponent(); 
    }

    private void InitializeComponent()
    {
    }

    protected override void Dispose(bool disposing)
    {
        if (disposing && components != null)
        {
            components.Dispose();
        }
        base.Dispose(disposing);
    }

    //__________________________________________________________________________
    [WebMethod(Description = "Hello World", EnableSession=true)]
    public string HelloWorld()
    {
        return "Hello World";
    }

    //__________________________________________________________________________
    [WebMethod(Description = "KoPortal.System.Data.Axapta.DBShops.GetDataByDataTime(ref tbl, dtFrom)", EnableSession = true)]
    public DataTable GetAxaptaShopsByDataTime(DateTime dtFrom)
    {
        DataTable tbl = new DataTable("tblShops");
        //Exception err = 
        //    KoPortal.System.Data.Axapta.DBShops.GetDataByDataTime(ref tbl, dtFrom);
        return tbl;
    }

    //__________________________________________________________________________
    [WebMethod(Description = "KoPortal.System.Data.Axapta.DBSuplier.GetDataByDataTime(ref tbl, dtFrom)", EnableSession = true)]
    public DataTable GetAxaptaSuplierByDataTime(DateTime dtFrom)
    {
        DataTable tbl = new DataTable("tblSuplier");
        //Exception err =
        //    KoPortal.System.Data.Axapta.DBSuplier.GetDataByDataTime(ref tbl, dtFrom);
        return tbl;
    }

}


